package com.sds.book.dubbo.provider.service.impl;

import com.sds.book.dubbo.api.IHelloService;
import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Value;

/**
 * 使用 dubbo 中提供的 @Service注解
 *
 * @author 01420175
 * @since 2024/3/11
 */
@Service
public class HelloServiceImpl implements IHelloService {

    @Value("${dubbo.application.name}")
    private String serviceName;

    @Override
    public String sayHello(String name) {
        return String.format("[%s]: hello, %s", serviceName, name);
    }

}
